export function useClone(old) {
    if (typeof old === 'object' && old !== null) {
        // 判断数组还是对象  开辟内存存储
        let res = Array.isArray(old)?[]:{}
        for (let k in old) {
            // 判断属性方法是否是自有的
            if (old.hasOwnProperty(k)) {
                res[k] = useClone(old[k])
            }
        }
        console.log(res)
        return res
    }else {
        return old
    }
}


